﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UcNsdConfig.ascx.cs" Inherits="TheHeGeo.UserControl.UcNsdManager" %>
<%@ Register assembly="DevExpress.Web.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>


<style type="text/css">
    .auto-style1 { }

    .auto-style2 { width: 136px; }

    .auto-style4 { }

    .auto-style5 { width: 113px; }

    .auto-style6 { width: 126px; }

    .auto-style7 {
    }
    .auto-style8 {
        width: 92px;
    }
</style>
<div style="width: 98%">
    
    <table style="width: 100%;">
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Tên đăng nhập">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtUserName" runat="server" ReadOnly="True" Width="100%">
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Email">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtEmail" runat="server" Width="100%">
                    <ValidationSettings ValidationGroup="user" Display="Dynamic">
                        <RequiredField ErrorText="Yêu cầu nhập" IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel7" runat="server" Text="Họ và tên">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtHoTen" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel8" runat="server" Text="Địa chỉ nhà riêng">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtDcNhaRieng" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Điện thoại">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtPhone" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel9" runat="server" Text="Tên công ty">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtTenCty" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel10" runat="server" Text="Địa chỉ công ty">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtDcCty" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">
                <dx:ASPxLabel ID="ASPxLabel11" runat="server" Text="Chức vụ">
                </dx:ASPxLabel>
            </td>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtChucVu" runat="server" Width="100%">
                    <ValidationSettings>
                        <RequiredField ErrorText="Yêu cầu nhập" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style1" colspan="3">
                <dx:ASPxLabel ID="lblErr" runat="server" ForeColor="Red" Visible="False">
                </dx:ASPxLabel>
            </td>
        </tr>
        <tr>
            <td class="auto-style8">&nbsp;</td>
            <td class="auto-style2">
                <asp:Button ID="btOk" runat="server" Text="Lưu thay đổi" Width="125px" OnClick="btOk_Click" OnClientClick=" return ASPxClientEdit.ValidateGroup('user'); " />
            </td>
            <td>
                <asp:Button ID="Button2" runat="server" Text="Đổi mật khẩu" Width="125px" CausesValidation="False" OnClick="Button2_Click" />
            </td>
        </tr>
        <tr>
            <td class="auto-style8">&nbsp;</td>
            <td class="auto-style2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style7" colspan="3">
        <dx:ASPxGridView ID="grvData" runat="server" AutoGenerateColumns="False" Width="100%" KeyFieldName="MaTenDuAn" >
            <Columns>
                <dx:gridviewdatatextcolumn Caption="Tên đăng nhập" FieldName="UserName" Name="UserName" VisibleIndex="1" ReadOnly="True">
                <Settings AutoFilterCondition="Contains"></Settings>
                </dx:gridviewdatatextcolumn>
                <dx:gridviewdatatextcolumn Caption="Email" FieldName="Email" Name="Email" VisibleIndex="3" ReadOnly="True">
                <Settings AutoFilterCondition="Contains"></Settings>
                </dx:gridviewdatatextcolumn>
                <dx:GridViewDataTextColumn Caption="Điện thoại" FieldName="DienThoai" Name="DienThoai" VisibleIndex="4">
                    <EditFormSettings CaptionLocation="Near" ColumnSpan="2" RowSpan="2" />
                    <Settings AutoFilterCondition="Contains"></Settings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Nhóm theo dự án" FieldName="MaTenDuAn" GroupIndex="0" Name="MaTenDuAn" SortIndex="0" SortOrder="Ascending" VisibleIndex="0">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Họ tên" FieldName="HoTen" Name="HoTen" VisibleIndex="2">
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsBehavior AutoFilterRowInputDelay="100" ConfirmDelete="True" />
            <SettingsPager PageSize="1" Mode="ShowAllRecords">
            </SettingsPager>
            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" ShowFooter="True" ShowGroupedColumns="True" ShowTitlePanel="True" />
            <SettingsText CommandDelete="Xóa" CommandEdit="Sửa" CommandNew="Thêm" ConfirmDelete="Bạn có muốn xóa bản ghi này?" Title="Danh sách người sử dụng trong các dự án" />
        </dx:ASPxGridView>
            </td>
        </tr>
    </table>
    
</div>
<dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" HeaderText="Đổi mật khẩu" Height="173px" Width="482px" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
    <ContentCollection>
        <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
            <table style="width: 100%;">
                <tr>
                    <td class="auto-style6">
                        <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="Mật khẩu cũ">
                        </dx:ASPxLabel>
                    </td>
                    <td colspan="2">
                        <dx:ASPxTextBox ID="txtOldPwd" runat="server" Width="100%">
                            <ValidationSettings SetFocusOnError="True" ValidationGroup="changePwd">
                                <RequiredField ErrorText="Yêu cầu nhập" IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6">
                        <dx:ASPxLabel ID="ASPxLabel5" runat="server" Text="Mật khẩu mới">
                        </dx:ASPxLabel>
                    </td>
                    <td colspan="2">
                        <dx:ASPxTextBox ID="txtNewPwd1" runat="server" Width="100%">
                            <ValidationSettings SetFocusOnError="True" ValidationGroup="changePwd">
                                <RequiredField ErrorText="Yêu cầu nhập" IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6">
                        <dx:ASPxLabel ID="ASPxLabel6" runat="server" Text="Nhập lại mật khẩu mới">
                        </dx:ASPxLabel>
                    </td>
                    <td colspan="2">
                        <dx:ASPxTextBox ID="txtNewPwd2" runat="server" Width="100%">
                            <ValidationSettings SetFocusOnError="True" ValidationGroup="changePwd">
                                <RequiredField ErrorText="Yêu cầu nhập" IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style4" colspan="3">
                        <dx:ASPxLabel ID="lblChangePwdErr" runat="server" ForeColor="Red" Visible="False">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6">&nbsp;</td>
                    <td class="auto-style5">
                        <asp:Button ID="btChangePwd" runat="server" OnClick="btChangePwd_Click" Text="Đổi mật khẩu" Width="100px" OnClientClick=" return ASPxClientEdit.ValidateGroup('changePwd'); "/>
                    </td>
                    <td>
                        <asp:Button ID="btCancelChangePwd" runat="server" CausesValidation="False" OnClick="btCancelChangePwd_Click" Text="Hủy bỏ" Width="100px" />
                    </td>
                </tr>
            </table>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>